<HTML>
<HEAD>
<meta charset="UTF-8">
<title>BaseFragment.requireCompatActivity - commons/ui</title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">commons/ui</a>&nbsp;/&nbsp;<a href="../index.html">com.vmadalin.commons.ui.base</a>&nbsp;/&nbsp;<a href="index.html">BaseFragment</a>&nbsp;/&nbsp;<a href="./require-compat-activity.html">requireCompatActivity</a><br/>
<br/>
<h1>requireCompatActivity</h1>
<a name="com.vmadalin.commons.ui.base.BaseFragment$requireCompatActivity()"></a>
<code><span class="keyword">fun </span><span class="identifier">requireCompatActivity</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">AppCompatActivity</span></code>
<p>Return the <a href="#">AppCompatActivity</a> this fragment is currently associated with.</p>
<h3>Exceptions</h3>
<p><a name="IllegalStateException"></a>
<code>IllegalStateException</code> - if not currently associated with an activity or if associated
only with a context.</p>
<p><a name="TypeCastException"></a>
<code>TypeCastException</code> - if the currently associated activity don't extend <a href="#">AppCompatActivity</a>.</p>
<p><strong>See Also</strong><br/>
<p><a href="#">requireActivity</a></p>
</p>
</BODY>
</HTML>
